<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
//=============================================================//
//Query File for Crontab Control (BigDaddy v2)
//Duleepa Wijyawardhana, 15.03.2004
//=============================================================//

switch($_REQUEST["action"])
{
    case "addtag":
		$aInfo["ID"] = $_POST["ID"];
		$aInfo["phoneNumber"] = $_POST["phoneNumber"];
		$aInfo["notes"] = $_POST["notes"];
		$BigDaddyControl->SetPhoneTag($aInfo);
		$redirectTo="page=PhoneTags";
        break;
    case "edittag":
		$aInfo["ID"] = $_POST["ID"];
		$aInfo["phoneNumber"] = $_POST["phoneNumber"];
		$aInfo["notes"] = $_POST["notes"];
		
		$BigDaddyControl->SetPhoneTag($aInfo, $aInfo["ID"]);
		$redirectTo="page=PhoneTags";
        break;
    case "deletetag":
		$BigDaddyControl->RemovePhoneTag($_REQUEST["tagID"]);
		$redirectTo="page=PhoneTags";
        break;
}

if ($redirectTo!="")
{
    header("Location: /index.html?".$redirectTo);
    exit;
}
else
{
    header("Location: /index.html");
    exit;
}

?>
